package com.smart.thrift.base;

import java.util.Map;

public class InvocationImpl implements Invocation {

    private final String targetServiceUniqueName;
    private final String methodName;
    private final String serviceName;
    private final Class<?>[] parameterTypes;
    private final Object[] arguments;
    private final Map<String, String> attachments;

    public InvocationImpl(String targetServiceUniqueName, String methodName, String serviceName, Class<?>[] parameterTypes, Object[] arguments, Map<String, String> attachments) {
        this.targetServiceUniqueName = targetServiceUniqueName;
        this.methodName = methodName;
        this.serviceName = serviceName;
        this.parameterTypes = parameterTypes;
        this.arguments = arguments;
        this.attachments = attachments;
    }

    @Override
    public String getTargetServiceUniqueName() {
        return targetServiceUniqueName;
    }

    @Override
    public String getMethodName() {
        return methodName;
    }

    @Override
    public String getServiceName() {
        return serviceName;
    }

    @Override
    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    @Override
    public Object[] getArguments() {
        return arguments;
    }

    @Override
    public Map<String, String> getAttachments() {
        return attachments;
    }
}
